package kit.docker.web;

import java.util.HashMap;
import java.util.Map;

/**
 * API请求响应状态码
 */
public abstract class APIResCode {

    public static Map<Integer, String> resCodeMap = new HashMap<>();

    public static final Integer SUCCESS = 200;

    public static final Integer SESSION_TIME_OUT = 300;

    public static final Integer USER_TYPE_FAIL = 301;

    public static final Integer FAIL = 400;

    public static final Integer API_SECURITY_PROTOCOL_AUTHENTICATION_FAILED = 401;

    public static final Integer PARAMETER_VALIDATOR_FAILED = 402;

    public static final Integer RESOURCE_NOT_FOUND = 404;

    static {
        resCodeMap.put(SUCCESS, "请求成功");
        resCodeMap.put(SESSION_TIME_OUT, "登录超时，请重新登陆");
        resCodeMap.put(USER_TYPE_FAIL, "无效用户类型");
        resCodeMap.put(FAIL, "请求失败");
        resCodeMap.put(API_SECURITY_PROTOCOL_AUTHENTICATION_FAILED, "安全验证失败");
        resCodeMap.put(PARAMETER_VALIDATOR_FAILED, "数据校验失败");
        resCodeMap.put(RESOURCE_NOT_FOUND, "资源未找到");

    }

}
